package com.jic.member.mapper;

import java.lang.Long;
import java.util.List;

import com.jic.common.base.vo.AdminOperate;
import com.jic.member.entity.MememberGrowthBase;
import com.jic.member.request.MemberGrowthBaseRequest;
import com.jic.member.response.MememberGrowthBaseResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 会员等级基础表
 * @author : 
 * @email : 
 * @since : 2020-04-08 11:35:06
 * @version : v1.0.0
 */
@Mapper
public interface MemMemberGrowthBaseMapper {

    long insert(MememberGrowthBase mememberGrowthBase);

    long delete(Long id);

    long update(MememberGrowthBase mememberGrowthBase);

    MememberGrowthBase queryByPrimaryKey(Long id);

    List<MememberGrowthBase> query(MememberGrowthBase mememberGrowthBase);

    List<MememberGrowthBase> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("mememberGrowthBase") MememberGrowthBase mememberGrowthBase);

    long queryPageCount(MememberGrowthBase mememberGrowthBase);

    List<MememberGrowthBaseResponse> getGrowthInfo(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("mememberGrowthBase") MemberGrowthBaseRequest memberGrowthBaseRequest);

    long queryGrowthBaseCount(@Param("mememberGrowthBase") MemberGrowthBaseRequest memberGrowthBaseRequest);

    long queryCountByDeptId(Long deptId);

    List<MememberGrowthBaseResponse> queryBaseRule(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("mememberGrowthBase") MemberGrowthBaseRequest memberGrowthBaseRequest);

    long queryBaseRuleCount(@Param("mememberGrowthBase") MemberGrowthBaseRequest memberGrowthBaseRequest);

    /**
     * 根据平台信息,查询该平台下 当天最高的成长值上限;
     * @param mememberGrowthBase 入参
     * @return 返参
     */
    List<MememberGrowthBase> listMemberGrowthBaseInfoByDeptInfo(MememberGrowthBase mememberGrowthBase);

    long queryStoreCountByDeptId(long l);

    MememberGrowthBase queryBaseByDeptIdAndDeptType(@Param("adminOperate")AdminOperate adminOperate);
}